<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    /* let i = 1
    while (i <= 5) {
      if (i === 4) {
        break //退出整个循环
      }
      console.log(`我要吃${i}个包子`);
      i++
    } */

    /* let i = 1
    while (i <= 5) {
      if (i === 3) {
        i++
        continue //结束本次循环,回到while
      }
      console.log(`我要吃${i}个包子`);
      i++
    } */

    while (1 < '2') {
      let ai = prompt('我可以操你吗?')
      if (ai === '可以')
        break
    }

  </script>
</body>

</html>